home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 24
/
Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso
/
Aminet
/
comm
/
tcp
/
finger.lha
/
Finger.amirx
next >
Wrap
Text File
|
1998-02-07
|
1KB
|
44 lines
/* $VER: Finger.amirx 1.2 (6/2/98) ©1998 Robin Cloutman
** requires AmIRC, Miami, and rexxdossupport.library
** Performs a finger on a nick/nick@url, with optional channel output
*/
IF ~SHOW(L,'rexxsupport.library') THEN ADDLIB('rexxsupport.library',0,-30,0)
IF ~SHOW(L,'rexxdossupport.library') THEN ADDLIB('rexxdossupport.library',0,-30,2)
OPTIONS RESULTS
PARSE ARG ARGS
NAME="Finger"
TEMPLATE="URL/A,SAY/S,SHOW/K"
READARGS(ARGS,TEMPLATE)
IF(URL="?") THEN DO;CECHO("Usage:" TEMPLATE);EXIT;END
IF(POS(".",URL)=0) THEN DO
"USERHOST" url
PARSE VAR RESULT URL
IF(URL="") THEN DO
CECHO("Unknown nick")
EXIT
END
END
FILENAME="PIPE:" || NAME || RANDOM(0,1000,TIME("S"))
ADDRESS COMMAND "RUN Miami:MiamiFinger" URL ">" || FILENAME
CALL OPEN(FILE,FILENAME,"READ")
DO UNTIL EOF(FILE)
TEMP=READLN(FILE)
IF(TEMP~="") THEN CECHO(TEMP)
END
CLOSE(FILE)
EXIT
CECHO:
IF(SAY) THEN DO
IF(LASTTIME=TIME("S")) THEN CALL DELAY(25)
"SAY" '02'x || "«" || NAME || "»" || '02'x ARG(1)
LASTTIME=TIME("S")
END
ELSE IF(SHOW~="SHOW") THEN DO
IF(LASTTIME=TIME("S")) THEN CALL DELAY(25)
"SAY /msg" SHOW '02'x || "«" || NAME || "»" || '02'x ARG(1)
LASTTIME=TIME("S")
END
ELSE "ECHO P="d2c(27)"b«" || NAME || "» C=3" ARG(1)
RETURN 0